<?php

class sfApplyResetRequestForm extends sfForm
{
  public function configure()
  {
    parent::configure();

    $this->setWidget('username',
      new sfWidgetFormInput(
        array(), array('maxlength' => 80, 'class' => 'reset_password_input')));
    $this->widgetSchema->setLabels(array('username' => 'enter_email'));
    
    
    $this->setValidator('username',
      new sfValidatorAnd(
        array(
          new sfValidatorString(array('required' => true,
            'trim' => true,
            'min_length' => 4,
            'max_length' => 80)),
          new sfValidatorPropelChoice(array('model' => 'sfGuardUser',
            'column' => 'username'), array("invalid" => "no_such_user")))));
    $this->widgetSchema->setNameFormat('sfApplyResetRequest[%s]');
    //$this->widgetSchema->setFormFormatterName('list');
    
    $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('reset-request');
  }
}

